/*********************
* Author:Dzlua
* QQ:505544956
* time:2016/08/21
*/
#ifndef __EDUI_STRINGMGR_H__
#define __EDUI_STRINGMGR_H__

#include "../utilities/String.h"

#include <vector>

EDUI_NAMESPACE_BEGIN

class EDUI_API StringMgr
{
public:
    StringMgr();
    ~StringMgr();
public:
    bool Add(const char* name, const char* text, const char* group = 0, int id = -1);
    void Remove(const char* name, const char* group = 0);
    void Remove(int id, const char* group = 0);
    const char* Get(const char* name, const char* group = 0);
    const char* Get(int id, const char* group = 0);
    void Clear();
    int Count(const char* group = 0);
    size_t GroupCount();
private:
    struct sData;
	typedef std::vector<sData*> DataMap;
    struct sGroup;
	typedef std::vector<sGroup*> GroupMap;

    DataMap* m_map;//global map
    GroupMap* m_group;
};

EDUI_NAMESPACE_END

#endif
